//
// Created by haoy on 2017/6/20.
//

#ifndef RTC_XSWITCH2_RTP_HEADER_HPP
#define RTC_XSWITCH2_RTP_HEADER_HPP

#include <cstdint>
#include <list>

class RtpHeader {
public:
    uint8_t v = 2;
    uint8_t p = 0;
    uint8_t x = 0;
    uint8_t cc = 0;
    uint8_t m = 0;
    uint8_t pt = 0;
    uint16_t seq = 0;
    uint32_t ts = 0;
    uint32_t ssrc = 0;
    
public:
    RtpHeader();
    int read(const uint8_t* data, const int size);
    int write(uint8_t* data, const int size);
    int size() const;
};


#endif //RTC_XSWITCH2_RTP_HEADER_HPP
